package com.chenyue.cm.utils.idwork;

/**
 * @ClassName StardardIdWorker
 * @Description TODO
 * @Author XDiongwei
 * @Date 2019-03-07 17:02
 **/
public class StardardIdWorker implements IdWorker {

    private IdWorkerHandler handler;

    public StardardIdWorker(int ... indexes) {
        handler = new IdWorkerHandler(indexes);
    }

    public int getMaxIndex() {
        return IdWorkerHandler.MAX_WORKER_INDEX;
    }


    @Override
    public long nextId() {
        return this.handler.nextId();
    }
}
